from django.db import models
from django.contrib.auth.models import AbstractUser

# Create your models here.


# 用户模型
class User(AbstractUser):
    nick_name = models.CharField(max_length=15, unique=True, default='', verbose_name='用户昵称')
    mobile = models.CharField(max_length=15, unique=True, verbose_name='用户手机号')
    avatar = models.ImageField(upload_to='avatar', verbose_name='用户头像')

    class Meta:
        db_table = 'user'
        verbose_name = '用户信息'
        verbose_name_plural = verbose_name
